package org.example.config;

import com.google.common.eventbus.EventBus;
import org.example.listener.EventBusListener;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Guava 配置
 *
 * @author Amadeus
 * @date 2025/05/22
 */
@Configuration
public class GuavaConfig {

    @Bean
    public EventBus eventBus(EventBusListener listener) {
        EventBus eventBus = new EventBus();
        eventBus.register(listener);
        return eventBus;
    }

}

